<%@ taglib uri="/WEB-INF/tld/struts-html.tld" prefix="html"%>
<%@ taglib uri="/WEB-INF/tld/struts-bean.tld" prefix="bean"%>
<%@ taglib uri="/WEB-INF/tld/c.tld" prefix="c"%>

<div id="content">
<div id="main-wrapper">
<div style="display: inline;" id="js">

<div id="leftcolumn">
<h2><bean:message key="editlist.label.list"/></h2>
<p><bean:message key="editlist.label.info"/> <a href="http://www.wishlistr.com/help/"
	title="Step by step instructions"><bean:message key="editlist.label.info2"/></a>.</p>
<br>

<ul>
	<li><a href="#formaddusergift"><bean:message key="editlist.label.additem"/></a></li>
</ul>

<br>

</div>
<!-- Closes #leftcolumn -->

<div class="clearall"></div>
<div class="hr" id="listdivider">
<hr>
</div>
<p id="small"><bean:message key="editlist.label.listtitle"/></p>
<h2 class="listname"><!--  <c:out value="${listname}"></c:out>-->
${requestScope.listname}</h2>


<div class="managetitle"><!-- <form id="standardform" method="post" action="">-->
<html:form method="post" styleClass="standardform" action="/list/${requestScope.act}_list">
	<table>
		<tr>
			<td><!-- <input maxlength="300" name="namelist" id="namelist" class="textfield" type="text" value="<c:out value="${listname}"></c:out>">-->
			<html:text styleClass="textfield" property="name" styleId="namelist"
				value="${requestScope.listname}" /></td>
			<td>
			<html:submit styleClass="listn" value="Save" /></td>
		</tr>
	</table>
</html:form></div>
<hr>


<div id="msg_list" class="msg_list"><input type="hidden" name="id"
	id="hid" class="hid" /> <c:forEach var="listElement" items="${giftlist}">


	<!-- ********************** -->
	<div id="zebra" class="zebra">
	
		<p class="msg_head">
		<h3 class="msg_head" id="tit"><c:out
			value="${listElement.link_name}" /></h3>
		</p>
		<div class="msg_body">
		<fieldset>
		<div>
		<table>
		<html:form method="post" styleId="standardform"
		styleClass="standardform" action="/gift/edit_gift">
		
			<div id="formmodifyusergift">
			<tr><td><html:errors property="title" /></td></tr>
			<tr>

				<td><label for="title"><bean:message key="editlist.label.title"/></label></td>
				<td><html:text styleClass="textfield" property="title" value="${listElement.link_name}"
					styleId="title"/>
					</td>
			</tr>
			<tr><td><html:errors property="link" /></td></tr>
			<tr>
				<td><label for="link"><bean:message key="editlist.label.link"/></label></td>
				<td><html:text styleClass="textfield" property="link" value="${listElement.link}" styleId="link"/>
					</td>
			</tr>
			<tr><td><html:errors property="description" /></td></tr>
			<tr>
				<td><label for="comment"><bean:message key="editlist.label.additinfo"/></label></td>
				<td><html:text styleClass="textfield" property="description" styleId="description" value="${listElement.description}"/>
				</td>
			</tr>
			<tr>
				<html:hidden property="id_gift" value="${listElement.id}"/>
				<td><html:submit styleClass="savegiftideas" value="Edit" /> <!-- 	<input type="hidden" value="editusergift" name="ajaxattempt" id="hiddenmodUserGift"/>-->
				<!-- 	<input type="image" src="img/btn-save.gif" alt="save" id="m" class="savegiftideas" />-->

				</td>

				</div>
</html:form>
				<div id="formdeleteusergift">
				<td>
					<html:form action="/gift/del_gift" method="post">
					
						<html:hidden property="id_gift" value="${listElement.id}"/>
						
						<html:submit styleClass="savegiftideas" value="Delete" />
					</html:form>
				
				</td>
				</div>
			</tr>
		</table>
		</div>
		</fieldset>
		</div>
	</div>
	<!-- ********************** -->
</c:forEach></div>


<br>
<div class="clearall"></div>
<br>

<a name="add"></a> <!-- **************************************************** -->
<a name="formaddusergift"></a>
<div id="formaddusergift">
<html:form method="post" styleClass="standardform" action="/gift/add_gift">


<fieldset><legend><bean:message key="editlist.label.additem"/> </legend><br />
<table>
<tr><td><html:errors property="title" /></td></tr>
	<tr>
		<th><bean:message key="editlist.label.title"/></th>
		<td><!-- <input  type="hidden" name="list" id="list" value="<c:out value="${listid}"></c:out>"/>-->
		<!-- <input maxlength="255" class="textfield" type="text" name="title" id="titleGift" />-->
		<html:text styleClass="textfield" property="title" styleId="titleGift"/>
		</td>
	</tr>
	<tr><td><html:errors property="description" /></td></tr>
	<tr>
		<th><bean:message key="editlist.label.descr"/></th>
		<td>
		<!-- <input maxlength="255" class="textfield" type="text" name="description" id="descriptionGift" /> -->
		<html:text property="description" styleClass="textfield" styleId="descriptionGift"/>
		
		</td>
	</tr>
	<tr><td><html:errors property="link" /></td></tr>
	<tr>
		<th><bean:message key="editlist.label.link"/></th>
		<td>
		<!-- <input maxlength="255" class="textfield" type="text"	name="link" id="linkGift" /></td>-->
		<html:text property="link" styleClass="textfield" styleId="linkGift"/>
		</td>
	</tr>
	<tr>
		<td>
		<!-- <input type="hidden" value="addusergift" name="ajaxattempt" id="hiddenUserGift" /> -->
		<!-- <input type="submit" value="Add" id="submitUserGift" class="submitUserGift" /> -->
		<html:submit styleClass="submitUserGift" value="Add" styleId="submitUserGift" /> 
	
				
		</td>
	</tr>
</table>
</fieldset>
</html:form>
</div>

<!-- **************************************************** --></div>



</div>
<!-- Closes #content --></div>
<!-- Closes #wrapper -->

